<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <title>个人中心</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <link href="css/base.css" rel="stylesheet" type="text/css" />
    <link href="css/button.css" rel="stylesheet" type="text/css" />
    <link href="css/icon.css" rel="stylesheet" type="text/css" />
    <link href="css/person.css" rel="stylesheet" type="text/css" />
</head>

<body>
    <img src="image/person-bg.png" class="person-bg-image" />
    <div class="avatar-container" onclick="openPerson();">
        <img src="" class="avatar-thumb" />
        <div class="avatar-mask"></div>
    </div>
    <div class="user-info">
        <div class="user-name"><strong></strong> <i class="sex sex-male"></i></div>
        <div class="process-info">
            <div class="process-left">
                <div class="process-top"></div>
                <div class="process-bottom">资料完整度&nbsp;&nbsp;</div>
            </div>
            <div class="process-right">
                <div class="process-top"></div>
                <div class="process-bottom"></div>
            </div>
        </div>
        <div class="statis-info">
            <div class="statis-item">
                <div class="item-value"></div>
                <a href="waiting-checkin.html">
                    <div class="item-name">我的粉丝</div>
                </a>
            </div>
            <div class="statis-item-divider"></div>
            <div class="statis-item">
                <div class="item-value"></div>
                <a href="waiting-profit.html">
                    <div class="item-name">待收益</div>
                </a>
            </div>
            <div class="statis-item-divider"></div>
            <div class="statis-item">
                <div class="item-value"></div>
                <a href="waited-profit.html">
                    <div class="item-name">已收益</div>
                </a>
            </div>
        </div>
    </div>
    <div class="card-container">
        <div class="card-wrap">
            <div class="card">
                <div class="card-item">
                    <div class="card-title"><strong>我的小家</strong><span class="home-icon"></span></div>
                    <div class="card-content">
                        <ul>
                            <li><a href="unused.html">优惠券 <i class="icon icon-card"></i></a></li>
                            <li><a href="appointing.html">预约中 <i class="icon icon-card"></i></a></li>
                            <li><a href="my-comment.html">待评价 <i class="icon icon-card"></i></a></li>
                            <li><a href="favorite.html">收藏夹 <i class="icon icon-card"></i></a></li>
                        </ul>
                    </div>
                </div>
                <div class="card-item">
                    <div class="card-title"><strong>我的帐户</strong><i class="icon icon-account"></i></div>
                    <div class="card-content">
                        <ul>
                            <li><a href="money.html">分享赚钱 <i class="icon icon-card"></i></a></li>
                            <li><a href="withdrawals.html">一键提现 <i class="icon icon-card"></i></a></li>
                            <li><a class="sign" href="agreement.html">我的合约 <i class="icon icon-card"></i></a></li>
                        </ul>
                    </div>
                </div>
                <div class="card-item">
                    <div class="card-title"><strong>我的管家</strong></div>
                    <div class="card-content">
                        <ul>
                            <li><a class="repair" href="repair.html">我要报修 <i class="icon icon-card"></i></a></li>
                            <li><a href="about.html">关于我们 <i class="icon icon-card"></i></a></li>
                            <li><a href="rule.html">小家公约 <i class="icon icon-card"></i></a></li>
                            <li><a href="wifi.html">连接wifi <i class="icon icon-card"></i></a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="footer-padding"></div>
    <ul class="bottom-bar">
        <li class="bottom-bar-item">
            <a href="index.html">
                <i class="icon icon-home"></i>
                <span class="item-title">小家</span>
            </a>
        </li>
        <li class="bottom-bar-item">
            <a href="message.html">
                <i class="icon icon-message"></i>
                <span class="item-title">消息</span>
            </a>
        </li>
        <li class="bottom-bar-item">
            <a class="active" href="javascript:;">
                <i class="icon icon-person"></i>
                <span class="item-title">Honey</span>
            </a>
        </li>
    </ul>
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" type="text/javascript"></script>
    <script src="js/template.js" type="text/javascript"></script>
    <script src="js/base.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function() {
            bee.wxConfig(function() {
                bee.hideAllNonBaseMenuItem();
            }, function(res) {});

            bee.request({
                url: '/Member/Index/index',
                data: null,
                success: function(data) {
                    bee.cache('user_id', data.info.id);
                    bee.cache('name', data.info.name);
                    bee.cache('avatar', data.info.logo);
                    bee.cache('sex', data.info.sex);
                    bee.cache('mobile', data.info.mobile);
                    bee.cache('birthday', data.info.birthday);
                    bee.cache('hometown', data.info.come_form);
                    bee.cache('company', data.info.company);
                    bee.cache('label', data.info.label);
                    bee.cache('feeling', data.info.feeling);
                    bee.cache('job', data.info.occupation_name);
                    bee.cache('job_id', data.info.occupation);
                    bee.cache('constellations', data.info.constellations);
                    bee.cache('autograph', data.info.autograph);

                    $('.avatar-thumb').attr('src', data.info.logo);
                    $('.user-name strong').text(data.info.name);
                    $('.statis-info .item-value:eq(0)').text(data.info.fens_num);
                    $('.statis-info .item-value:eq(1)').text(data.info.pending_income);
                    $('.statis-info .item-value:eq(2)').text(data.info.profit_money);
                    $('.process-info .process-left').css('width', data.info.wanchendu + '%');
                    $('.process-info .process-right .process-bottom').text(data.info.wanchendu + '%');
                    $('.process-info .process-right').css('width', (98 - data.info.wanchendu) + '%');
                }
            });

            bee.request({
                url: '/Member/Repair/getInfo',
                data: null,
                success: function(data) {
                    if (data.info === null || JSON.stringify(data.info) === '[]' || JSON.stringify(data.info) === '{}') {
                        $('.repair').hide();
                    }
                }
            });

            bee.request({
                url: '/Member/Index/contract',
                data: null,
                success: function(data) {
                    if (data.info === null || JSON.stringify(data.info) === '[]' || JSON.stringify(data.info) === '{}') {
                        $('.sign').hide();
                    }
                }
            });

            //            var height = $('.person-bg-image').height();
            //            $('.avatar-container').css('margin-top', height - 60);

        });

        function openPerson() {
            window.location.href = 'person-edit.html';
        }
    </script>
</body>

</html>
